package com.njtoyo.taxi.admin.rest.export.driver;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverRegistrationInfoSate;

public class DriverRegistrationInfoSateConverter implements Converter<DriverRegistrationInfoSate> {
    @Override
    public Class<?> supportJavaTypeKey() {
        return DriverRegistrationInfoSate.class;
    }

    @Override
    public CellDataTypeEnum supportExcelTypeKey() {
        return CellDataTypeEnum.STRING;
    }

    @Override
    public WriteCellData<?> convertToExcelData(DriverRegistrationInfoSate value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return new WriteCellData(value.getDesc());
//        return new CellData(String.valueOf(value.getDesc()));

    }
}
